/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/<a href="https://www.kaaction.com">KAA</a>"><a href="https://www.kaaction.com">KAA</a></a> All rights reserved.
 */
package com.kaaction.modules.ka.entity;

import org.hibernate.validator.constraints.Length;
import java.util.Date;
import java.util.List;
import com.google.common.collect.Lists;
import com.kaaction.common.persistence.DataEntity;
import com.kaaction.common.utils.excel.annotation.ExcelField;
import com.kaaction.modules.sys.entity.Dict;

/**
 * 货品管理Entity
 * @author huanghaiming
 * @version 2017-04-25
 */
public class ProductManage extends DataEntity<ProductManage> {
	
	private static final long serialVersionUID = 1L;
	private ProductManageDetails productManageDetails;
	private String categoryId;		// 品类
	private String categoryName;		// 品类名称
	private String canalId;		// 渠道
	private String supplierId;		// 供应商
	private String supplierName;		// 供应商名称
	private String productCode;		// 货号
	private Date instockDate;		// 入库时间
	private String sizeId;		// 尺码
	private String sizeName;		// 尺码名称
	private String colorId;		// 颜色
	private String colorName;		// 颜色名称
	private Integer num;		// 数量
	private Double price;		// 价格
	private String gridNo;		// 库位号
	private String state;		// 状态
	private String condition;		// 状态1
	private double instockPrice;//入库价格
	private double outstockPrice;//出库价格
	private double salesPrice;//售出价格
	private double activePrice;//活动价格
	private double realPrice;//销售实际价格
	private Integer amount;		// 数量
	
	private KaColor color;
	private KaSize size;
	private KaSupplier supplier;
	private KaCategory category;
	
	
	private String materialDetails;		// 物料明细
	private Integer materialAmount;		// 物料数量
	
	
	private List<ProductManage> columnList = Lists.newArrayList();	// 表列
	
	
	private List<Dict>  listPro = Lists.newArrayList();
	
	private List<Dict> listSize = Lists.newArrayList();
	
	private List<Dict> listColor = Lists.newArrayList();
	
	
	private List<ProductManageDetails> eventSkuList = Lists.newArrayList();
	
	private List<MaterialDetails> eventMaterialList = Lists.newArrayList(); 
	
	private String[] ids;
	
	private Date startDate;//开始日期
	private Date endDate;//结束日期
	
	public ProductManage() {
		super();
	}

	public ProductManage(String id){
		super(id);
	}

	public String getCategoryId() {
		return categoryId;
	}

	public void setCategoryId(String categoryId) {
		this.categoryId = categoryId;
	}
	
	public String getCanalId() {
		return canalId;
	}

	public void setCanalId(String canalId) {
		this.canalId = canalId;
	}

	public String getSupplierId() {
		return supplierId;
	}

	public void setSupplierId(String supplierId) {
		this.supplierId = supplierId;
	}
	
	@Length(min=1, max=64, message="货号长度必须介于 1 和 64 之间")
	@ExcelField(title="货号", align=2, sort=4)
	public String getProductCode() {
		return productCode;
	}

	public void setProductCode(String productCode) {
		this.productCode = productCode;
	}

	@ExcelField(title="入库时间", align=2, sort=18)
	public Date getInstockDate() {
		return instockDate;
	}
	
	public void setInstockDate(Date instockDate) {
		this.instockDate = instockDate;
	}

	public String getSizeId() {
		return sizeId;
	}

	public void setSizeId(String sizeId) {
		this.sizeId = sizeId;
	}

	public String getColorId() {
		return colorId;
	}

	public void setColorId(String colorId) {
		this.colorId = colorId;
	}
	@ExcelField(title="件数", align=2, sort=12)
	public Integer getNum() {
		return num;
	}

	public void setNum(Integer num) {
		this.num = num;
	}

	@ExcelField(title="入库价格", align=2, sort=14)
	public Double getPrice() {
		return price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}

	public double getOutstockPrice() {
		return outstockPrice;
	}

	public void setOutstockPrice(double outstockPrice) {
		this.outstockPrice = outstockPrice;
	}

	public double getSalesPrice() {
		return salesPrice;
	}

	public void setSalesPrice(double salesPrice) {
		this.salesPrice = salesPrice;
	}

	public double getActivePrice() {
		return activePrice;
	}

	public void setActivePrice(double activePrice) {
		this.activePrice = activePrice;
	}

	public double getRealPrice() {
		return realPrice;
	}

	public void setRealPrice(double realPrice) {
		this.realPrice = realPrice;
	}

	@ExcelField(title="货架", align=2, sort=16)
	public String getGridNo() {
		return gridNo;
	}

	public void setGridNo(String gridNo) {
		this.gridNo = gridNo;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}
	
	@ExcelField(title="状态", align=2, sort=50)
	public String getCondition() {
		String str = "";
		if("0".equals(condition)){
			str = "已新增待质检";
		}else if("1".equals(condition)){
			str = "已入库待上架";
		}else if("2".equals(condition)){
			str = "已上架";
		}else if("4".equals(condition)){
			str = "已下架";
		}else if("6".equals(condition)){
			str = "退货（非残次品）";
		}else{
			str = "未知";
		}
		return str;
	}

	public void setCondition(String condition) {
		this.condition = condition;
	}

	public double getInstockPrice() {
		return instockPrice;
	}

	public void setInstockPrice(double instockPrice) {
		this.instockPrice = instockPrice;
	}

	public String getMaterialDetails() {
		return materialDetails;
	}

	public void setMaterialDetails(String materialDetails) {
		this.materialDetails = materialDetails;
	}

	public Integer getMaterialAmount() {
		return materialAmount;
	}

	public void setMaterialAmount(Integer materialAmount) {
		this.materialAmount = materialAmount;
	}

	public List<ProductManage> getColumnList() {
		return columnList;
	}

	public void setColumnList(List<ProductManage> columnList) {
		this.columnList = columnList;
	}

	public List<Dict> getListPro() {
		return listPro;
	}

	public void setListPro(List<Dict> listPro) {
		this.listPro = listPro;
	}

	public String[] getIds() {
		return ids;
	}

	public void setIds(String[] ids) {
		this.ids = ids;
	}

	public List<Dict> getListSize() {
		return listSize;
	}

	public void setListSize(List<Dict> listSize) {
		this.listSize = listSize;
	}

	public List<Dict> getListColor() {
		return listColor;
	}

	public void setListColor(List<Dict> listColor) {
		this.listColor = listColor;
	}

	public ProductManageDetails getProductManageDetails() {
		return productManageDetails;
	}

	public void setProductManageDetails(ProductManageDetails productManageDetails) {
		this.productManageDetails = productManageDetails;
	}

	public List<ProductManageDetails> getEventSkuList() {
		return eventSkuList;
	}

	public void setEventSkuList(List<ProductManageDetails> eventSkuList) {
		this.eventSkuList = eventSkuList;
	}

	public KaColor getColor() {
		return color;
	}

	public void setColor(KaColor color) {
		this.color = color;
	}

	public KaSize getSize() {
		return size;
	}

	public void setSize(KaSize size) {
		this.size = size;
	}

	public KaSupplier getSupplier() {
		return supplier;
	}

	public void setSupplier(KaSupplier supplier) {
		this.supplier = supplier;
	}

	public KaCategory getCategory() {
		return category;
	}

	public void setCategory(KaCategory category) {
		this.category = category;
	}

	public Integer getAmount() {
		return amount;
	}

	public void setAmount(Integer amount) {
		this.amount = amount;
	}

	public List<MaterialDetails> getEventMaterialList() {
		return eventMaterialList;
	}

	public void setEventMaterialList(List<MaterialDetails> eventMaterialList) {
		this.eventMaterialList = eventMaterialList;
	}

	@ExcelField(title="品类", align=2, sort=2)
	public String getCategoryName() {
		return categoryName;
	}

	public void setCategoryName(String categoryName) {
		this.categoryName = categoryName;
	}

	@ExcelField(title="供应商", align=2, sort=6)
	public String getSupplierName() {
		return supplierName;
	}

	public void setSupplierName(String supplierName) {
		this.supplierName = supplierName;
	}

	@ExcelField(title="尺码", align=2, sort=8)
	public String getSizeName() {
		return sizeName;
	}

	public void setSizeName(String sizeName) {
		this.sizeName = sizeName;
	}

	@ExcelField(title="颜色", align=2, sort=10)
	public String getColorName() {
		return colorName;
	}

	public void setColorName(String colorName) {
		this.colorName = colorName;
	}

	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}
	
}